.SUFFIXES:.cpp .o
CC=g++
CFLAG = -O2 -W -Wall
AR=ar

#SRCS=Interface.cpp
#OBJS=$(SRCS:.cpp=.o)
INC = ./code  

SRCS  := $(wildcard *.cpp ./code/*.cpp) # xun zhao suo you de cpp wen jian 
OBJS    := $(patsubst %.cpp,%.o,$(SRCS)) # ba suo you .cpp wen jian ti huan wei .o  ru: Interface.cpp ---> Interface.o

 $(info $(SRCS))
 $(info $(OBJS))

EXEC=libmyso.a


all: $(OBJS)
	$(AR) cq $(EXEC) $(OBJS)
	@echo "-----------------------------OK-----------------------"

#$(OBJS):$(SRCS)
#
#	$(CC) $(CFLAG) -o $(OBJS) -c $(SRCS)
%*.o:%*.cpp
	$(CC) $(CFLAG) $(INC) -o $@ -c $<


clean:
	rm -rf $(EXEC) $(OBJS)
